package com.studyweb.service;

import com.studyweb.pojo.entity.WrongQuestion;

import java.util.List;
import java.util.Map;

/**
 * 错题本服务接口
 */
public interface WrongQuestionService {
    
    /**
     * 获取错题列表
     */
    Map<String, Object> getQuestions(
        int pageNum, int pageSize, String questionType,
        String difficulty, String category, String module, String keyword);
    
    /**
     * 创建错题
     */
    boolean createQuestion(WrongQuestion question);
    
    /**
     * 获取错题详情
     */
    WrongQuestion getQuestionById(Long id);
    
    /**
     * 更新错题
     */
    boolean updateQuestion(WrongQuestion question);
    
    /**
     * 删除错题
     */
    boolean deleteQuestion(Long id);
    
    /**
     * 批量删除错题
     */
    boolean batchDeleteQuestions(List<Long> ids);
    
    /**
     * 获取练习题目
     */
    List<WrongQuestion> getPracticeQuestions(
        Integer count, String difficulty, String category, String module);
    
    /**
     * 获取练习题目（支持自定义排序）
     */
    List<WrongQuestion> getPracticeQuestions(
        Integer count, String difficulty, String category, String module, String orderBy, String orderType);
    
    /**
     * 提交答案
     */
    Map<String, Object> submitAnswer(Map<String, Object> answerData);
    
    /**
     * 获取答题结果
     */
    Map<String, Object> getResults(int pageNum, int pageSize);
}